usb: Don't init pointer to zero, but NULL
authorMarek Vasut <[email protected]>
Tue, 26 Apr 2016 23:55:10 +0000 (01:55 +0200)
committerMarek Vasut <[email protected]>
Fri, 6 May 2016 16:35:06 +0000 (18:35 +0200)
The pointer should always be inited to NULL, not zero (0). These are
two different things and not necessarily equal.

Signed-off-by: Marek Vasut <[email protected]>
Cc: Chin Liang See <[email protected]>
Cc: Dinh Nguyen <[email protected]>
Cc: Hans de Goede <[email protected]>
Cc: Stefan Roese <[email protected]>
Cc: Stephen Warren <[email protected]>
common/usb.c

index 4d0de4d87e83a1bfd5f15ea171472de4260a59d2..63429d4d5a9fcadd2fe15f1497294a0112911b22 100644 (file)
@@ -1064,7 +1064,7 @@ static int usb_prepare_device(struct usb_device *dev, int addr, bool do_read,
 
 int usb_select_config(struct usb_device *dev)
 {
-       unsigned char *tmpbuf = 0;
+       unsigned char *tmpbuf = NULL;
        int err;
 
        err = get_descriptor_len(dev, USB_DT_DEVICE_SIZE, USB_DT_DEVICE_SIZE);